// @ts-ignore
import * as lqip from "lqip"

/**
 * @param {string} imagePath
 * @returns {string}
 */
export const getPopularColor = async (imagePath) => {
	const avarage = await lqip.palette(imagePath)
	return avarage[0]
}

/** @param {string} imagePath */
export const preview = async (imagePath) => {
	const base64 = lqip.base64(imagePath)
	return base64
}
